<template>
  <div class="main">
    <h2>test组件</h2>
    main传过来的值：{{data}}
    <hr />
    <el-input v-model="input" placeholder="请输入数量" style="width:200px;"></el-input>（个）*
    <el-input v-model="input2" placeholder="请输入单价" style="width:200px;"></el-input>（元）
    <h2>总价为：{{products}}</h2>
  </div>
</template>
<script>
export default {
  props: {},
  name: "test",
  data() {
    return {
      data: this.$route.query.message,
      num: "",
      input: "",
      input2: ""
    };
  },
  computed: {
    products() {
      return this.input * this.input2;
    }
  }
};
</script>
<style lang="less" scoped>
</style>